Configure the Session Expiration Page

 

About Session Expiration Page

  • The SmartHub Session Expiration page is used in case the user's browser session expires, and seamless authentication is not possible for various reasons.

  • The AuthDialog module controls the Session Expiration page.

How to Configure the Session Expiration Page

To configure the AuthDialog component, insert the AuthDiag settings code into settings for the HTML page (your custom Results.html page, for example) you wish to use the component.

UI Builder

The easiest and fastest way to change the Session Expiration page is via the SmartHub UI Builder.

For information about how to access the UI Builder as well as who can access it, see How to Use the UI Builder.

Procedure:

  1. SmartHub administrators can simply click the UI Editor link from the SmartHub ADMINISTRATION page.

  2. Click the Select a page link from the top menu.

  3. Select (double-click) the page (Index.html, Results.html, landing.html, etc.) you wish to modify.

    1. Below, the Results.html page is shown for sample purposes.

    2. BA Insight recommends you create your own custom page and folder to modify. Leave the default files as templates.

  4. Select the Advanced mode from the top right of the page.

  5. Select Advanced settings edit.

  6. Scroll down to line 239 (this may vary), which contains the text SH.AuthDialog.CustomSettings

  7. Click the link Default Settings at the top right.

  8. A new browser tab opens with all available SmartHub module settings.

  9. Search for the word "AuthDialog" on the page to quickly navigate to the AuthDialog default settings, shown below:
Copy
Default AuthDialog Settings
SH.AuthDialog.DefaultSettings = 
    {
        TitleLabel: "Session expired",
        MessageLabel: "Your session has expired. You will have to refresh the page to continue.",
        ActionLabel: "Refresh",
        Action: "return window.location.reload()",
        EventName: "sessionExpired",
        TrySilentRedirect: false,
        TemplatePath: SH.RootLevelURL + "/modules/AuthDialog/templates/template.html",
        ParentContainer: "body",
        AutoRunActionFor: 
        {
            "key": "dummy_value"
        }
    }
  1. Copy the AuthDialog settings section from SH.AuthDialog.DefaultSettings.
  2. Go back to your Advanced settings edit tab.

  3. Paste the copied settings inside section SH.AuthDialog.CustomSettings.
    • Note: The Enabled value is commented out by default.

  4. Modify settings as desired. Refer to the "AuthDialog Settings" table below.

  5. Click Save changes.

  6. Click the link Preview <html> file.html at the top of the code editor.

  7. Review your HTML page in the new tab that opens.

  8. Make any necessary changes back in the code editor. Repeat steps 13-18 as necessary.

  9. Click Save changes.

 

AuthDialog Settings

Option Value Description
TitleLabel Session expired The title of the pop-up window for session expiration
MessageLabel Your session has expired. You will have to refresh the page to continue. The message displayed in pop-up window for session expiration
ActionLabel Refresh The text from action button
Action return window.location.reload() The page where the redirect is made after the Refresh button is clicked
EventName sessionExpired The event that triggers the session expired action
TrySlientRedirect false
  • false:

    • The expired session requires user action to start a new session.

    • The user must refresh the browser page via pressing F5 or by clicking the browser Refresh button.

  • true:

    • When the session expired event is triggered, the browser page refreshed automatically.

    • No user action is required.

TemplatePath SH.RootLevelURL + "/modules/AuthDialog/templates/template.html" The path to the html template used for pop-up window.
ParentContainer body The selector where the Session expired template is injected
AutoRunActionFor "key": "dummy_value"
  • some regex expressions can be set.

  • In case there is a match between the regex expression and the event detail run the “Action“ configured above.